Currently tinc init script will delete the generated configuration folder and then...
authorAlessio Caiazza <[email protected]>
Mon, 11 Aug 2014 10:24:27 +0000 (12:24 +0200)
committerSaverio Proto <[email protected]>
Fri, 3 Oct 2014 15:51:44 +0000 (17:51 +0200)
This patch will first check if the generated configuration folder exists and then delete it, after that it will always create the configuration folder.

net/tinc/Makefile
net/tinc/files/tinc.init

index 67618e32f064e2d198e931c6455c4d5da1d2d16a..945ca781cdcb74bf114e4ffb03784b79ab042d0d 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tinc
 PKG_VERSION:=1.0.24
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.tinc-vpn.org/packages
index b24bc682ecef4e576c1b6be90f2780a53422d4c6..e49b358770f34e48779d28742bfa33847cee113c 100644 (file)
@@ -135,10 +135,8 @@ prepare_net() {
 
        section_enabled "$s" || return 1
 
-        # rm old config
-        rm -rf "$TMP_TINC/$s/"
-
-       [ ! -d "$TMP_TINC/$s" ] && mkdir -p "$TMP_TINC/$s"
+       [ -d "$TMP_TINC/$s" ] && rm -rf "$TMP_TINC/$s/"
+       mkdir -p "$TMP_TINC/$s"
        [ -d "/etc/tinc/$s" ] && cp -r "/etc/tinc/$s" "$TMP_TINC/"
 
        # append flags